package com.estore.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

import com.estore.entity.Role;

public class RoleMapper implements RowMapper<Role> {

	@Override
	public Role mapRow(ResultSet rs, int arg1) throws SQLException {
		Role role = new Role();
		role.setUserID(rs.getInt("userID"));
		role.setRole(rs.getInt("role"));
		role.setIsBanned(rs.getInt("isBanned"));
		return role;
	}

}
